<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>栏目管理</title>
<link rel="stylesheet" type="text/css" href="template/admin.css"/>
<script type="text/javascript" src="template/images/jquery.js"></script>
<style type="text/css">
body{margin:20px;}
</style>
<script type="text/javascript">
$(document).ready(function(){
	$('#show_list').find('tr').hover(function(){
		$(this).find('td').css('background','#ccffcc');
	},function(){
		$(this).find('td').css('background','');
	});
	
});
</script>
</head>

<body>
<div class="div_out">
 <div class="position"><h2>当前位置 > <a href="?">标示内容管理</a></h2></div>
</div><!--导航-->


 

<div id="sys">
<form name="maininfo" method="post" action="?" class="form" enctype="multipart/form-data">
<div class="div_out" id="tb">
 <table cellpadding="0" cellspacing="0" width="100%">
 	<thead>
		<tr><th style="width:5%">选择</th><th style="width:30%">标示名称</th><th style="width:30%">使用方法</th><th style="width:35%">操作</th></tr>
	</thead>
	<tbody id="show_list">
	<?php
	
	$maintb=DB_PRE."block";
	$page=empty($page)?1:$page;
	$pagesize=30;
	$pagenum=($page-1)*$pagesize;
	$query='&id='.$id.'&action=content_list';
	$total_num=$GLOBALS['mysql']->fetch_rows("select id from {$maintb}");
	$total_page=ceil($total_num/$pagesize);
	$sql="select * from {$maintb} order by id desc limit {$pagenum},{$pagesize}";
	$rel=$GLOBALS['mysql']->fetch_asc($sql);
	if(!empty($rel)){
	foreach($rel as $key=>$value){
	?>
		<tr><td style="width:5%" align="center"><input type="checkbox" style="border:0" value="<?php echo $value['id'];?>" name="all[]" /></td><td style="width:30%" align="center"><?php echo $value['tag'];?></td><td scope="width:30%" align="center">通过模板输出配置使用</td><td style="width:35%" align="center"><a href="javascript:if(confirm('确定要删除么,删除后不可恢复!')){location.href='?action=del&id=<?php echo $value['id'];?>';}" style="padding:0 3px;">删除</a>|<a href="?action=edit_content&id=<?php echo $value['id'];?>" style="padding:0 3px;">修改</a></td></tr>
		<?php }
		}?>
		</tbody>
 </table>
 </div>
 <div class="btn" style="margin-top:8px; text-align:left;">
<input type="button" onclick="javascript:location.href='?';" value="添加内容" name="add" style="margin:0 10px 0 0;" class="go"/>
 </div>
</form>
</div><!--内容切换-->

<div class="page">
 	<ul>
		<?php echo page('admin_content_tag.php',$page,$query,$total_num,$total_page);?>
	</ul>
 </div>

</body>
</html>
